import bannerService from "@/service/banner/BannerService.js"

export default {
		data() {
			return {
				list: [
					'7天酒店钟点房打特价啦',
					'7天酒店钟点房打特价啦',
					'7天酒店钟点房打特价啦',
					'7天酒店钟点房打特价啦',
					'奔跑吧暑假'
				],
				 swiperlist:[
                    {image: 'https://cdn.uviewui.com/uview/swiper/swiper2.png',
                    title: '昨夜星辰昨夜风，画楼西畔桂堂东',
                },{
                    image: 'https://cdn.uviewui.com/uview/swiper/swiper1.png',
                    title: '身无彩凤双飞翼，心有灵犀一点通'
                },{
                    image: 'https://cdn.uviewui.com/uview/swiper/swiper3.png',
                    title: '谁念西风独自凉，萧萧黄叶闭疏窗，沉思往事立残阳'}
                 ],
				countrylist:[
					{name:'国内',type:0},
					{name:'国外',type:1},
					{name:'名宿',type:2}
				],
				countrytyle:0,
				show: false,
				mode: 'range',
				startDate:"7月21日",
				endDate:"7月23日",
				nights:1
			}
		},
		onLoad() {
			
			 bannerService.loadBanners();
	
		
		},
		methods: {
			onTab(type){
				if(type!==this.countrytyle){
					this.countrytyle = type
				}
			},
			searchData(){
				uni.navigateTo({
					url:'../hotel/hotel',
				})
			},
			change(e) {
				//获取时间值
				if(e.startMonth==e.endMonth){
					this.nights = e.endDay - e.startDay
				}
				this.startDate = e.startMonth+'月'+e.startDay+'日'
				this.endDate = e.endMonth+'月'+e.endDay+'日'
			},
		}
	}